<template>
  <div>首页</div>
  <div>{{ store.userInfo?.id }}</div>
  <router-view />

  <van-tabbar route>
    <van-tabbar-item to="/home">
      <template #icon="{ active }">
        <cp-icon :name="active ? 'home-index-active' : 'home-index-default'"></cp-icon>
      </template>
      首页</van-tabbar-item
    >
    <van-tabbar-item to="/article">
      健康百科
      <template #icon="{ active }">
        <cp-icon :name="`home-article-${active ? 'active' : 'default'}`" />
      </template>
    </van-tabbar-item>
    <van-tabbar-item to="/notify">
      消息中心
      <template #icon="{ active }">
        <cp-icon :name="`home-notice-${active ? 'active' : 'default'}`" />
      </template>
    </van-tabbar-item>
    <van-tabbar-item to="/user">
      我的
      <template #icon="{ active }">
        <cp-icon :name="`home-mine-${active ? 'active' : 'default'}`" />
      </template>
    </van-tabbar-item>
  </van-tabbar>
</template>

<script setup>
import { useUserStore } from '@/stores/user'

const store = useUserStore()
</script>

<style lang="scss" scoped></style>
